import request from "@/utils/request";

// 获取省市
export function baseArea(id) {
  return request({
    url: "/v1/baseArea/getChildrenById/"+id,
    method: "get"
  });
}

//新增站点

export function siteSave(data) {
    return request({
      url: "/v1/sites/save",
      method: "post",
      data
    });
  }
  //修改
  export function siteUpdate(data) {
    return request({
      url: "/v1/sites/update",
      method: "post",
      data
    });
  }
  
  //根据租户查询 设备
  export function pageByTenantId(data) {
    return request({
      url: "/v1/device/pageByTenantId",
      method: "get",
      params:data
    });
  }
  
  //站点分页 
  export function siteList(data) {
    return request({
      url: "/v1/sites/page",
      method: "get",
      params:data
    });
  }
  //站点list全部 
  export function siteAllList() {
    return request({
      url: "/v1/sites/list",
      method: "get"
    });
  }


  //删除站点 
  export function deleteId(id) {
    return request({
      url: "/v1/sites/delete/"+id,
      method: "get"
    });
  }
  
//详情

export function details(id) {
    return request({
      url: "/v1/sites/get/"+id,
      method: "get"
    });
  }

  //设备信息

  export function countDeviceNum() {
    return request({
      url: "/v1/sites/countDeviceNum",
      method: "get"
    });
  }
